package app.util.image.action
{
	import app.util.*;
	
	import flash.display.*;
	import flash.geom.*;
	
	public class AlgrDrawbasedAction extends AbstractAction
	{
		private var mode:String;
		private var other:BitmapData;
		
		public function setValue(s:String, o:BitmapData):void
		{
			this.mode = s;
			this.other = o;	
		}
		
		public override function getDescription():String
		{
			var desc:String = mode.toLocaleUpperCase();
			return "Algebraic (" + desc + ")";
		}
		
		public override function getActionedBitmapData():BitmapData
		{
			var old:BitmapData = Mediator.getCurrentBitmapData();
			var ret:BitmapData = old.clone();
			ret.draw(this.other, null, null, this.mode);
			return ret;
		}	
	}
}